#ifndef PROGRAM_H_
#define PROGRAM_H_

enum Type
{
	none,
	boolean,
	i8,
	i16,
	i32,
	i64,
	i128,
	u8,
	u16,
	u32,
	u64,
	u128,
	field,
};

enum{
    Inst_add,
    Inst_addW,
    Inst_div,
	Inst_divW,
	Inst_mul,
	Inst_mulW,
	Inst_sub,
	Inst_subW,
	Inst_lt,
	Inst_lte,
	Inst_gt,
	Inst_gte,
	Inst_nor,
	Inst_isEq,
	Inst_isNeq,
	Inst_mod,
	Inst_pow,
	Inst_powW,
	Inst_shl,
	Inst_shlW,
	Inst_shr,
	Inst_shrW,
	Inst_xor,
	Inst_or,
	Inst_and,
	Inst_nand,
	Inst_rem,
	Inst_remW,
	Inst_abs,
	Inst_absW,
	Inst_inv,
	Inst_neg,
	Inst_square,
	Inst_double,
	Inst_castLossy,
	Inst_not,
	Inst_ternary,
	Inst_hashBhp256,
	Inst_hashBhp512,
	Inst_hashBhp768,
	Inst_hashBhp1024,
	Inst_hashKeccak256,
	Inst_hashKeccak384,
	Inst_hashKeccak512,
	Inst_hashPed64,
	Inst_hashPed128,
	Inst_hashPsd2,
	Inst_hashPsd4,
	Inst_hashPsd8,
	Inst_hashSha3_256,
	Inst_hashSha3_384,
	Inst_hashSha3_512,
};

struct Instruction
{
public:
    int type;
    int inOp[3];
    int inOpSize;

    int outOp;
};

constexpr int CONST_REG_START = 150;

struct Program
{
public:
    Instruction inst[128];
    int instSize;
    int inputRegSize;
    int constRegSize;
    char regType[512];
    char constValue[2048];
};


#endif